home *** CD-ROM | disk | FTP | other *** search
/ Programming Windows 95 with MFC / Programming Windows 95 with MFC (Microsoft Programming Series)(097-0001465)(1996).iso / CODE / Chap05 / IconView / IconView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-05  |  1.0 KB  |  50 lines

  1. //***********************************************************************
  2. //
  3. //  IconView.h
  4. //
  5. //***********************************************************************
  6.  
  7. class CMyApp : public CWinApp
  8. {
  9. public:
  10.     virtual BOOL InitInstance ();
  11. };
  12.  
  13. class CIconListBox : public CListBox
  14. {
  15. public:
  16.     virtual BOOL PreCreateWindow (CREATESTRUCT&);
  17.     virtual void MeasureItem (LPMEASUREITEMSTRUCT);
  18.     virtual void DrawItem (LPDRAWITEMSTRUCT);
  19.     int AddIcon (HICON);
  20.     void ProjectImage (CDC*, LPRECT, COLORREF);
  21. };
  22.  
  23. class CMainWindow : public CWnd
  24. {
  25. private:
  26.     int m_cxChar;
  27.     int m_cyChar;
  28.  
  29.     CFont m_font;
  30.     CRect m_rcImage;
  31.  
  32.     CButton m_ctlGroupBox;
  33.     CIconListBox m_ctlIconListBox;
  34.     CStatic m_ctlLabel;
  35.  
  36. public:
  37.     CMainWindow ();
  38.  
  39. protected:
  40.     virtual void PostNcDestroy ();
  41.  
  42.     afx_msg int OnCreate (LPCREATESTRUCT);
  43.     afx_msg void OnPaint ();
  44.     afx_msg void OnSetFocus (CWnd*);
  45.     afx_msg void OnDropFiles (HDROP);
  46.     afx_msg void OnSelChange ();
  47.  
  48.     DECLARE_MESSAGE_MAP ()
  49. };
  50.